EWGL.util = {
    log : function (text){
        document.getElementById("log").innerHTML += text + " <br \>";
    },
    findInstances : function (object1){
        EWGL.util.log("object");
        for (x in object1){
            EWGL.util.log("   " + x + " : " + object1[x]);
        }
    },
    augment : function(options,defaults){
        var r = {};
        options = options || {};
        for (x in defaults){
            r[x] = options[x] || defaults[x];
        }
        return r;
    },
    getDOMNodeText : function(elementID){
        var node = document.getElementById(elementID);
        if (!node) return null;

        var str = "";
        var n   = node.firstChild;
        while (n) {
            if (n.nodeType == 3) {
                str += n.textContent;
            }
            n = n.nextSibling;
        }
        return str;
    }
};